#ifndef GRASS_H
#define GRASS_H

#include "Entity.h"
#include "../WindowsCompatibility/Physx.h"
#include "../SurfaceRenderingData.h"
#include "../WrappedContainers/ArrayList.h"

class Grass : public Entity {
protected:
	static const int cellCountX;
	static const int cellCountY;
	static const float cellW;
	static const float cellH;
	static const float density;
	static const float thickness;
	static const float bendingStiffness;
	static const unsigned int grassCount;

	static NxClothMeshDesc cmDesc;
	static NxClothMesh* clothMesh;
	static NxForceFieldLinearKernel* linearKernel;

	static SurfaceRenderingData srdCloth;

	static ArrayList<Grass*> grassList;

	NxCloth* cloth;

	static NxReal *textCoords;	

public:
	static void Load();

	static void Add(const NxVec3& pos, const NxVec3& orientation);
	static int GetCount();
	static void DeleteAll();

	static void SetWind(const NxVec3& force);

	static void DrawAll();

public:
	Grass(const NxVec3& pos, const NxVec3& orientation);
	virtual ~Grass();

	virtual void Draw();
};

#endif //GRASS_H
